import { View } from "../../../mvc/core/View";
import { ObjCreate } from "../common/ObjCreate";
import { GScrollPane } from "../../../../com/mui/controls/GScrollPane";
import { ScrollPolicy } from "../../../../fl/controls/ScrollPolicy";
import { ScaleBitmap } from "../../../../com/mui/display/ScaleBitmap";
//class PetHireInfoPanel
    
    export  class PetHireInfoPanel extends View
    {
        constructor()
        {
            super();
            this.init();
            return;
        }

        public setSize(arg1: number, arg2: number): void
        {
            this._bgWidth = arg1;
            this._bgHeight = arg2;
            this.drawNow();
            return;
        }

        /* internal  */init(): void
        {
            this._bg = ObjCreate.createBg(0, 0, 250, 280, this);
            this._contentTxt = ObjCreate.createTextField("", 5, 5, 225, 270, this);
            this._contentTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._contentTxt.multiline = true;
            this._contentTxt.wordWrap = true;
            this._contentPane = new GScrollPane();
            this._contentPane.styleName = "GScrollPane";
            this._contentPane.horizontalScrollPolicy = ScrollPolicy.OFF;
            this._contentPane.verticalScrollPolicy = ScrollPolicy.ON;
            this._contentPane.width = 235;
            this._contentPane.height = 270;
            this._contentPane.source = this._contentTxt;
            this._contentPane.move(12, 5);
            this.addChild(this._contentPane);
            return;
        }

        /* internal  */drawNow(): void
        {
            this._bg.width = this._bgWidth;
            this._bg.height = this._bgHeight;
            this._contentTxt.width = this._bgWidth - 25;
            this._contentTxt.height = this._bgHeight - 10;
            this._contentPane.width = this._bgWidth - 15;
            this._contentPane.height = this._bgHeight - 10;
            this._contentPane.update();
            return;
        }

        public updateByContent(arg1: string): void
        {
            this._contentTxt.htmlText = "<textFormat leading=\'5\'>" + arg1 + "</textFormat>";
            this._contentPane.update();
            return;
        }

        /* internal */ /* var */_bgWidth: number=250;

        /* internal */ /* var */_bgHeight: number=280;

        /* internal */ /* var */_bg: ScaleBitmap;

        /* internal */ /* var */_contentPane: GScrollPane;

        /* internal */ /* var */_contentTxt: Object /* flash.text.TextField */;
    }
